﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace MF.HSD.MFHSDCreateVoucherUIModel
{
	[Serializable]
	public partial class MFHSDCreateVoucherUIModelModel : UIModel
	{
		#region Constructor
		public MFHSDCreateVoucherUIModelModel() : base("MFHSDCreateVoucherUIModel")
		{
			InitClass();
			this.SetResourceInfo("38837911-ff05-4461-855e-da50f62b4828");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private MFHSDCreateVoucherUIModelModel(bool isInit) : base("MFHSDCreateVoucherUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new MFHSDCreateVoucherUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private SrcVoucherModelView viewSrcVoucherModel;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public SrcVoucherModelView SrcVoucherModel
		{
			get { return (SrcVoucherModelView)this["SrcVoucherModel"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewSrcVoucherModel = new SrcVoucherModelView(this);
			this.viewSrcVoucherModel.SetResourceInfo("278a4d77-b0db-41cd-a8fc-790d0716ae17");
			this.Views.Add(this.viewSrcVoucherModel);			

			
		}

		public override string AssemblyName
		{
			get { return "MF.HSD.MFHSDProject_UIProject"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class SrcVoucherModelView : UIView
	{
		#region Constructor
		public SrcVoucherModelView(IUIModel model) : base(model,"SrcVoucherModel","", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private SrcVoucherModelView():base(null,"SrcVoucherModel","", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new SrcVoucherModelView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}
		public IUIField FieldCreatedOn
		{
			get { return this.Fields["CreatedOn"]; }
		}
		public IUIField FieldCreatedBy
		{
			get { return this.Fields["CreatedBy"]; }
		}
		public IUIField FieldModifiedOn
		{
			get { return this.Fields["ModifiedOn"]; }
		}
		public IUIField FieldModifiedBy
		{
			get { return this.Fields["ModifiedBy"]; }
		}
		public IUIField FieldSysVersion
		{
			get { return this.Fields["SysVersion"]; }
		}
		public IUIField FieldSrcOrgCode
		{
			get { return this.Fields["SrcOrgCode"]; }
		}
		public IUIField FieldSrcOrgName
		{
			get { return this.Fields["SrcOrgName"]; }
		}
		public IUIField FieldVoucherNo
		{
			get { return this.Fields["VoucherNo"]; }
		}
		public IUIField FieldLineNum
		{
			get { return this.Fields["LineNum"]; }
		}
		public IUIField FieldAccount
		{
			get { return this.Fields["Account"]; }
		}
		public IUIField FieldAccountCode
		{
			get { return this.Fields["AccountCode"]; }
		}
		public IUIField FieldMoneyDr
		{
			get { return this.Fields["MoneyDr"]; }
		}
		public IUIField FieldMoneyCr
		{
			get { return this.Fields["MoneyCr"]; }
		}
		public IUIField FieldSegmentNumber
		{
			get { return this.Fields["SegmentNumber"]; }
		}
		public IUIField FieldSegmentValue
		{
			get { return this.Fields["SegmentValue"]; }
		}
		public IUIField FieldToAccount
		{
			get { return this.Fields["ToAccount"]; }
		}
		public IUIField FieldAccountName
		{
			get { return this.Fields["AccountName"]; }
		}
		public IUIField FieldAbstracts
		{
			get { return this.Fields["Abstracts"]; }
		}


		[Obsolete("请使用CurrentFilter属性，这个方法有可能会导致强弱类型转换出错")]
		public SrcVoucherModelDefaultFilterFilter DefaultFilter
		{
			get { return (SrcVoucherModelDefaultFilterFilter)this.CurrentFilter; }
		}
		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","f5eaa86b-95e6-4bd0-a995-f0aa9fdfcf4d");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","36aa01ed-cc6e-48c9-bad0-d325d2d0a0c7");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","ad4eb116-ce14-43ca-ae4e-7d3290ad70c3");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","54ecb317-4bea-4cb8-917d-1e330e566dbb");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","c411aa16-83b2-4b52-936c-51653e8f65a1");
			UIModelRuntimeFactory.AddNewUIField(this,"SysVersion", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","d9edcd4b-aaf8-4f5e-80b8-c52c0853c438");
			UIModelRuntimeFactory.AddNewUIField(this,"SrcOrgCode", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","fda11222-8da5-4764-822c-87eb076e7577");
			UIModelRuntimeFactory.AddNewUIField(this,"SrcOrgName", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","5d8b0338-a62e-4acf-9e6f-748b798a00b7");
			UIModelRuntimeFactory.AddNewUIField(this,"VoucherNo", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","e922320f-26bd-4764-b558-c7dc2bcb2423");
			UIModelRuntimeFactory.AddNewUIField(this,"LineNum", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","d084ce89-0842-44e5-81d4-ca6cd55067eb");
			UIModelRuntimeFactory.AddNewUIField(this,"Account", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","7b5f25fb-e223-42a7-87d6-2bcb59492265");
			UIModelRuntimeFactory.AddNewUIField(this,"AccountCode", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","9fdc5dd6-e142-4c57-bb9a-ac995292e3ef");
			UIModelRuntimeFactory.AddNewUIField(this,"MoneyDr", typeof(Decimal), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","f9a49039-5ed0-40bb-bbf9-9968ee3a9f4e");
			UIModelRuntimeFactory.AddNewUIField(this,"MoneyCr", typeof(Decimal), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","6c6db67f-a47f-4c55-9fb1-e2c1af8f0eee");
			UIModelRuntimeFactory.AddNewUIField(this,"SegmentNumber", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","84e640bc-16f2-4b62-aba9-240a45c9d191");
			UIModelRuntimeFactory.AddNewUIField(this,"SegmentValue", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","2bb3ce69-887d-49f0-89e8-9db28558802d");
			UIModelRuntimeFactory.AddNewUIField(this,"ToAccount", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","0dfbdfcd-3582-4d73-848a-a0424a81db99");
			UIModelRuntimeFactory.AddNewUIField(this,"AccountName", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","62f8f9b0-1012-4d19-b00c-ad0d7fe8eeb4");
			UIModelRuntimeFactory.AddNewUIField(this,"Abstracts", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","ac41615e-96d8-4601-b7f2-e97ce9322644");


			this.CurrentFilter = new SrcVoucherModelDefaultFilterFilter(this);
		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new SrcVoucherModelRecord(builder);
		}
		#endregion

		#region new method
		public new SrcVoucherModelRecord FocusedRecord
		{
			get { return (SrcVoucherModelRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new SrcVoucherModelRecord AddNewUIRecord()
		{	
			return (SrcVoucherModelRecord)base.AddNewUIRecord();
		}
		public new SrcVoucherModelRecord NewUIRecord()
		{	
			return (SrcVoucherModelRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class SrcVoucherModelRecord : UIRecord
	{
		#region Constructor
		public SrcVoucherModelRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private SrcVoucherModelView uiviewSrcVoucherModel
		{
			get { return (SrcVoucherModelView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new SrcVoucherModelRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewSrcVoucherModel.FieldID);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldID] = value;
			}
		}
		
		
		public  DateTime CreatedOn
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldCreatedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewSrcVoucherModel.FieldCreatedOn);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldCreatedOn] = value;
			}
		}
		
		
		public  String CreatedBy
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldCreatedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldCreatedBy);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldCreatedBy] = value;
			}
		}
		
		
		public  DateTime ModifiedOn
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldModifiedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewSrcVoucherModel.FieldModifiedOn);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldModifiedOn] = value;
			}
		}
		
		
		public  String ModifiedBy
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldModifiedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldModifiedBy);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldModifiedBy] = value;
			}
		}
		
		
		public new Int64 SysVersion
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldSysVersion] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewSrcVoucherModel.FieldSysVersion);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldSysVersion] = value;
			}
		}
		
		
		public  String SrcOrgCode
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldSrcOrgCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldSrcOrgCode);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldSrcOrgCode] = value;
			}
		}
		
		
		public  String SrcOrgName
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldSrcOrgName] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldSrcOrgName);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldSrcOrgName] = value;
			}
		}
		
		
		public  String VoucherNo
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldVoucherNo] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldVoucherNo);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldVoucherNo] = value;
			}
		}
		
		
		public  String LineNum
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldLineNum] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldLineNum);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldLineNum] = value;
			}
		}
		
		
		public  String Account
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldAccount] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldAccount);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldAccount] = value;
			}
		}
		
		
		public  String AccountCode
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldAccountCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldAccountCode);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldAccountCode] = value;
			}
		}
		
		
		public  Decimal? MoneyDr
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldMoneyDr] ;
				//return (Decimal?)value;
				return GetValue<Decimal?>(this.uiviewSrcVoucherModel.FieldMoneyDr);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldMoneyDr] = value;
			}
		}
		
		
		public  Decimal? MoneyCr
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldMoneyCr] ;
				//return (Decimal?)value;
				return GetValue<Decimal?>(this.uiviewSrcVoucherModel.FieldMoneyCr);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldMoneyCr] = value;
			}
		}
		
		
		public  String SegmentNumber
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldSegmentNumber] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldSegmentNumber);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldSegmentNumber] = value;
			}
		}
		
		
		public  String SegmentValue
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldSegmentValue] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldSegmentValue);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldSegmentValue] = value;
			}
		}
		
		
		public  String ToAccount
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldToAccount] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldToAccount);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldToAccount] = value;
			}
		}
		
		
		public  String AccountName
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldAccountName] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldAccountName);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldAccountName] = value;
			}
		}
		
		
		public  String Abstracts
		{
			get{
				//object value = this[this.uiviewSrcVoucherModel.FieldAbstracts] ;
				//return (String)value;
				return GetValue<String>(this.uiviewSrcVoucherModel.FieldAbstracts);
			}
			set{
				this[this.uiviewSrcVoucherModel.FieldAbstracts] = value;
			}
		}
		#endregion
	}
	
	[Serializable]
	public class SrcVoucherModelDefaultFilterFilter : UIFilter
	{
		#region Constructor
		public SrcVoucherModelDefaultFilterFilter(IUIView view) 
			: base("DefaultFilter",view,@"",@"")
		{
			InitClass();
		}
		//for Clone Constructor
		private SrcVoucherModelDefaultFilterFilter()
			: base("DefaultFilter",null,"","")
		{}
		protected override IUIFilter CreateCloneInstance()
		{
			return new SrcVoucherModelDefaultFilterFilter();
		}
		#endregion

		#region property
		#endregion
		
		#region function
		private void InitClass()
		{
		}
		#endregion

	}



}